<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<table class="t_css" width="100%" border="0" cellpadding="0" id="orgInfo" cellspacing="1">
	<tr>
		<td colspan="6" class="t_bar">单位基本信息</td>
	</tr>
	<tr>
		<td width="10%" align="right">单位名称：<input type="hidden"
			name="organizations/organization[0]@submit_org" value="1"> <input
			type="hidden" name="organizations/organization[0]/sequence_no"
			value="1"> <input type="hidden"
			name="organizations/organization[0]/org_code"
			value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>"></td>
		<td colspan="5" width="90%"><span
			name="organizations/organization[0]/cname"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/org_name" />
		</span></td>

	</tr>
	<tr>
		<td width="10%" align="right">法人代码：</td>
		<td width="20%"><span name="organizations/organization[0]/org_no">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/org_no" />
		</span></td>
		<td nowrap align="right" width="10%">营业执照注册号：</td>
		<td width="20%"><span
			name="organizations/organization[0]/org_licence"> <x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/org_licence" />
		</span></td>
		<td width="10%" nowrap align="right">国税登记证号：</td>
		<td width="30%"><span
			name="organizations/organization[0]/tax_internal_no"> <x:out select="$xmlData/data/organizations/organization[@submit_org=1]/tax_internal_no" />
		</span></td>	
	</tr>
	
	<tr>
		<td align="right" width="10%">通讯地址：</td>
		<td  width="20%"><span
			name="organizations/organization[0]/address"> <x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/address" />
		</span></td>
		<td nowrap align="right">生产、办公面积：</td>
		<td >
		    <span name="organizations/organization[0]/office_product_develope" id="office_product_develope"></span>
		    <input type="hidden" id='office_develope' value="<x:out select='$xmlData/data/organizations/organization[@submit_org=1]/office_develope' />">
		    <input type="hidden" id='office_product' value="<x:out select='$xmlData/data/organizations/organization[@submit_org=1]/office_product' />">
		    <script type="text/javascript">
	           $(function() {
	        	   var office_develope=$("#office_develope").val();
		             if(office_develope=="" || office_develope=='由系统统计')
		            	 office_develope=0;
		             var office_product=$("#office_product").val();
		             if(office_product=="" || office_product=='由系统统计')
		            	 office_product=0;
		             var count=parseInt(office_develope)+parseInt(office_product);
		             $("#office_product_develope").text(count+"平方米");
	           });
            </script>
		</td>
		<td nowrap align="right">地税登记证号：</td>
		<td><span name="organizations/organization[0]/tax_local_no"><x:out select="$xmlData/data/organizations/organization[@submit_org=1]/tax_local_no" /></span>
		</td>
	</tr>
	<tr>
		<td nowrap align="right">开户银行：</td>
		<td width="300px"><span
			name="organizations/organization[0]/bank_orgname"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/bank_orgname" />
		</span></td>
		<td nowrap align="right">银行账号：</td>
		<td><span name="organizations/organization[0]/bank_account">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/bank_account" />
		</span></td>
		<td nowrap align="right">信用等级：</td>
		<td><span name="organizations/organization[0]/bank_credit">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/bank_credit" />
		</span></td>
	</tr>
    <tr>

		<td align="right" width="10%">注册时间：</td>
		<td width="20%"><span name="organizations/organization[0]/registe_date"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/registe_date" />
		</span></td>

		<td align="right" width="10%">注册资金：</td>
		<td width="20%"><span name="organizations/organization[0]/registe_fund"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/registe_fund" />万
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/registe_fund_money_name" />
		</span></td>
		<td align="right" width="10%" nowrap>其中外资比例：</td>
		<td width="30%"><span
			name="organizations/organization[0]/registe_fund_foreign_rate"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/registe_fund_foreign_rate" />%
		</span></td>
	</tr>
	
	
	<tr>
	  <td align="right" width="10%">单位网址：</td>
		<td width="20%"><span name="organizations/organization[0]/http"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/http" />
		</span></td>
		<td width="10%" align="right">传真：</td>
		<td width="20%"><span name="organizations/organization[0]/fax"> <x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/fax" />
		</span></td>
		
		<td align="right" width="10%">注册登记类型：</td>
		<td width="30%"><span name="organizations/organization[0]/nature_name"><x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/nature_name" />
		</span></td>
		
		
	</tr>
	<tr>
		<td align="right" width="10%">职工总数：</td>
		<td width="20%"><span name="organizations/organization[0]/people_count_total"><x:out select="$xmlData/data/organization_persons/people_count_total" />
		</span>人</td>
	  <td  colspan="4">其中
		博士：<span
			name="organizations/organization[0]/degree_doctor"><x:out
					select="$xmlData/data/organization_persons/degree_doctor" /></span>人
		硕士：<span
			name="organizations/organization[0]/degree_master"><x:out
					select="$xmlData/data/organization_persons/degree_master" /></span>人
		本科：<span
			name="organizations/organization[0]/degree_bachelor"><x:out
					select="$xmlData/data/organization_persons/degree_bachelor" /></span>人
		专科：<span
			name="organizations/organization[0]/degree_college"><x:out
					select="$xmlData/data/organization_persons/degree_college" /></span>人
		其他：<span
			name="organizations/organization[0]/degree_other"><x:out
					select="$xmlData/data/organization_persons/degree_other" /></span>人
		</td>
	</tr>

	<tr>
		<td align="right" width="10%">法定代表人：</td>
		<td width="20%"><span
			name="organizations/organization[0]/legal_name"> <x:out
					select="$xmlData/data/organization_persons/person[@type='faren']/cname" />
		</span></td>
		<td align="right" width="10%">电话：</td>
		<td width="20%"><span
			name="organizations/organization[0]/legal_tel"> <x:out
					select="$xmlData/data/organization_persons/person[@type='faren']/tel" />
		</span></td>
		<td align="right" width="10%">手机：</td>
		<td width="30%"><span
			name="organizations/organization[0]/legal_mobile"> <x:out
					select="$xmlData/data/organization_persons/person[@type='faren']/mobile" />
		</span></td>
	</tr>
	
	<tr id='fzr'>
	<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
	    <td align="right" width="10%">项目负责人：</td>
		<td width="20%">
		<input type="text" disabled="disabled" name="proposal/contact_name" label="项目负责人"  class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/contact_name"/>" maxlength="100"/>
		<input type='hidden' name='contact_name' value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" />" />
	
		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<span id="personSelect">
				<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="更改">
				<cpt:personSelect key="personSelect" addRole="3" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
				</span>
		</security:authorize>
		</td>
		<td align="right" width="10%">职务：</td>
		<td width="20%">
		<input type='text' name='proposal/contact_position' class='required' maxlength='50' label='职务' value="<x:out select="$xmlData/data/proposal/contact_position"/>"/>
	    <input type='hidden' name='contact_position' value='<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" />' />
		</td>
		<td align="right" width="10%">手机：</td>
		<td width="20%"> 
		<input type='text' name='proposal/contact_mobile' class='required mobile' maxlength='11' onfocus="InitInput.setNumber(this,11,0,0)" label='手机' value="<x:out select="$xmlData/data/proposal/contact_mobile"/>" />
	    <input type='hidden' name='contact_mobile' value='<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />' />
		</td>
	</security:authorize>
	<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
		<td align="right" width="10%">项目负责人：</td>
		<td width="20%"><span name="proposal/contact_name"> <x:out
					select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" />
		</span></td>
		<td align="right" width="10%">职务：</td>
		<td width="20%"><span name="proposal/contact_position"><x:out
					select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" />
		</span></td>
		<td align="right" width="10%">手机：</td>
		<td width="20%"><span name="proposal/contact_mobile"><x:out
					select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />
		</span></td>
	</security:authorize>
	</tr>
	<tr>
		<td align="right" width="10%"><span class="color_red">*</span>上年度销售额：</td>
		<td  colspan="5">
		<input  name="proposal/sell_total" class="required"   label="上年度销售额" style="text-align:right" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/sell_total" />"/>万元</td>
	</tr>
	
	<tr>
		<td align="right" width="10%"><span class="color_red">*</span>上年度纳税额：</td>
		<td colspan="5">
		<input name="proposal/ratal_total" id="ratal_total" class="input_text gray" disabled="disabled"  style="background-color:#d8d8d9; text-align:right" value="<x:out select="$xmlData/data/proposal/ratal_total" />" />万元
		其中，
		国税：<input  name="proposal/country_ratal" class="required" onchange="countFundAuto('ratal_','city,country','total')" id="ratal_country" label="上年度纳税额国税" style="text-align:right" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/country_ratal" />"/>万元，
		地税：<input  name="proposal/city_ratal" class="required" id="ratal_city" onchange="countFundAuto('ratal_','city,country','total')"  label="上年度纳税额地税" style="text-align:right" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/city_ratal" />"/>万元。
		</td>
		
	</tr>
	
	
	<tr>
		<td width="10%" nowrap align="right" >经营范围（按营业执照）：</td>
		<td colspan='5'><span
			name="organizations/organization[0]/opt_scope">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/opt_scope" />
		</span></td>
	</tr>
	<tr>
		<td width="10%" nowrap align="right" >主营产品或服务：</td>
		<td colspan='5'><span
			name="organizations/organization[0]/product_main">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/product_main" />
		</span></td>
	</tr>
	<tr>
		<td width="" nowrap align="right" >企业特性：</td>
		<td colspan='5'><span
			name="organizations/organization[0]/chk_characteristic_name">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/chk_characteristic_name" />
		</span></td>
	</tr>
	
</table>
<br>
<div class="t_bar"><span class="color_red">*</span>单位人员情况</div>
<table class="t_css table01" cellpadding="0" cellspacing="0" width="100%"
	id='orgInfo2' align="center">
	 <tr>
			<th align="right"  rowspan="4">单位负责人情况</th>
			<th class="TblHead" align="center">姓名</th>
			<th class="TblHead" align="center" colspan="2">出生年月</th>
			<th class="TblHead" align="center">证件类型</th>
			<th class="TblHead" align="center">证件号码</th>
		</tr>
		<tr>
		<td align="center"><span name="proposal/responsible_cname"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/cname" /></span></td>
		<td align="center" colspan="2">
		<c:set var="bod"><x:out select="$xmlData/data/proposal/responsible_bod" /></c:set> 
		<cpt:date id="bod" name="proposal/responsible_bod" value="${bod}" className="required date" label="单位负责人情况->出生年月"></cpt:date>
		<input type="hidden" name="proposal/responsible_position" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/position" />">
		</td>
		<td align="center"><span name="proposal/responsible_id_type_name"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_type_name" /></span></td>
		<td align="center"><span name="proposal/responsible_id_no"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_no" /></span></td>
		</tr>
		<tr>
		<th class="TblHead" align="center">学历</th>
		<th class="TblHead" align="center">专业</th>
		<th class="TblHead" align="center">电话</th>
		<th class="TblHead" align="center">手机</th>
		<th class="TblHead" align="center">Email</th>
		</tr>
		<tr>
			<td align="center"><span name="proposal/responsible_educate_background_name"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/educate_background_name" /></span></td>
			<td align="center"><input name="proposal/responsible_major" class="required" label="单位负责人情况->专业"  value="<x:out select="$xmlData/data/proposal/responsible_major" />" maxlength="50"/></td>
			<td align="center"><span name="proposal/responsible_tel"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/tel" /></span></td>
			<td align="center"><span name="proposal/responsible_mobile"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/mobile" /></span></td>
			<td align="center"><input name="proposal/responsible_email" class="required email" label="单位负责人情况->Email"  value="<x:out select="$xmlData/data/proposal/responsible_email" />" maxlength="50"  /></td>
       </tr>
		
	
</table>
<br/>
<div class="t_bar"><span class="color_red">*</span>近二年举办学术交流活动情况</div>
<table id="tblFundProjectList" border="0" cellspacing="0" cellpadding="0" class="table01" >
	<thead>
		<tr>
			<th class="TblHead" align="center" width="3%">选择</th>
			<th class="TblHead" align="center" width="3%">序号</th>
			<th class="TblHead" align="center" width="10%">活动名称</th>
			<th class="TblHead" align="center" width="14%">时间</th>
			<th class="TblHead" align="center" width="15%">地点</th>
			<th class="TblHead" align="center" width="15%">主要承担单位</th>
			<th class="TblHead" align="center" width="15%">交流领域</th>
			<th class="TblHead" align="center" width="15%">活动形式与人数规模</th>
			<th class="TblHead" align="center" width="10%" >得到政府经费资助情况</th>
		</tr>
	</thead>
	<tbody id="tab">
					<tr style="display:none">
						<td align="center">
							<input type="radio" class="radiobutton"  name="selFundProjectList" >
						</td>
						<td align="center">
							<span name="organizations|participating_units|fund_project_list|project[0]@seq_no" >[index]</span> 
						</td>
						<td>
							<input type="text" size="10" name="organizations|participating_units|fund_project_list|project[0]|zh_title" label="活动名称 "  class="required input_text " maxlength="50"/>
						</td>
						<td nowrap>
							<input  size="13" id="fund_project_list_grant_date_[0]" name="organizations|participating_units|fund_project_list|project[0]|grant_date"  class="required input_text formatDate" label="时间" />
						</td> 
						<td>
							<input size="18" type="text" name="organizations|participating_units|fund_project_list|project[0]|place" label="地点" class="required input_text " maxlength="50"/>
						</td> 	
						<td>
							<input size="18" type="text" name="organizations|participating_units|fund_project_list|project[0]|unit" label="主要承担单位"   class="required input_text " maxlength="50"/>
						</td> 
						<td>
							<input size="18" type="text" name="organizations|participating_units|fund_project_list|project[0]|field" label="交流领域"   class="required input_text " maxlength="50"/>
						</td>
						<td>
							<input size="20" type="text" name="organizations|participating_units|fund_project_list|project[0]|scale" label="活动形式与人数规模"   class="required input_text " maxlength="50"/>
						</td>
						<td>
							<input size="10" type="text" name="organizations|participating_units|fund_project_list|project[0]|funds" label="得到政府经费资助情况"   class="required input_text " maxlength="50"/>
						</td>
					</tr>
					
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/organizations/participating_units/fund_project_list/project" var="project">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td align="center" >
							<input type="radio" class="radiobutton" name="selFundProjectList" >
						</td>
						<td align="center" >
							<span   name="organizations/participating_units/fund_project_list/project[${flag}${index}]@seq_no" ><x:out select="$project/@seq_no"/></span> 
						</td>
						<td >
							<input size="10" type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/zh_title" label="活动名称"  class="required input_text " value="<x:out select="$project/zh_title" />" maxlength="50"/>
						</td>
						<td nowrap>
							<c:set var="grant_date" scope="page"><x:out select="$project/grant_date"/></c:set>
							<input size="13" id="fund_project_list_grant_date_[${flag}${index}]" value="${grant_date}" label="时间" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/grant_date" class="required input_text formatDate"  />
						</td> 
						<td >
							<input size="18"  type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/place" label="地点"   class="required input_text " value="<x:out select="$project/place" />" maxlength="50"/>
						</td> 
						
						<td >
							<input  size="18" type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/unit" label="主要承担单位"   class="required input_text " value="<x:out select="$project/unit" />" maxlength="50"/> 
						</td>
						<td >
							<input size="18" type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/field" label="交流领域"  class="required input_text " value="<x:out select="$project/field" />" maxlength="50"/> 
						</td>
						<td >
							<input  size="20" type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/scale" label="活动形式与人数规模"   class="required input_text " value="<x:out select="$project/scale" />" maxlength="50"/> 
						</td>
						<td >
							<input  size="10" type="text" name="organizations/participating_units/fund_project_list/project[${flag}${index}]/funds" label="得到政府经费资助情况"   class="required input_text " value="<x:out select="$project/funds" />" maxlength="50"/> 
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblFundProjectList");
					</script>
				</tbody>
					</table>
					<br>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblFundProjectList',6,'学术交流活动情况最多只能填写6条')){addNewRow('tblFundProjectList');showDateTag('tblFundProjectList');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblFundProjectList','selFundProjectList')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblFundProjectList','selFundProjectList')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblFundProjectList','学术交流活动情况')">
					</td></tr>
	</table>
	<script type="text/javascript">
	function selectPsnCall(data) {
	$("input[name$='psn_code']").val(data.person.psnCode);
	$("#fzr").find("input[name$='contact_name']").val(data.person.zhName);
	$("#fzr").find("input[name$='contact_position']").val(data.personExtend.basic_info.position);
	$("#fzr").find("input[name$='contact_mobile']").val(data.personExtend.contact.mobile);
	tb_remove2();
	}
	</script>
	<script type="text/javascript">
      $(function() {
         initPersonValue("fzr");
      });
      
      function initPersonValue(tblName){
    	  var tbl = $("#" + tblName);
    	 
    	  tbl.find("input[type=hidden]").each(function(){
    			var id=$(this).attr("name");
    			
    			if(id==null || id=="")
    				return true;
    			var parentObj=tbl.find("[name$='/"+id+"']");
    			
    			if(parentObj.val() == null || $.trim(parentObj.val()) == ""){
    				var value= $(this).val();
	    			parentObj.val(value);
    			}
    			
    		});
    	  
      }
</script>
